# Style sheet for XSLT transformation to book HTML pages
if(BRLCAD_EXTRADOCS_HTML)
  configure_file(
    ${CMAKE_CURRENT_SOURCE_DIR}/../resources/brlcad/brlcad-specification-xhtml-stylesheet.xsl.in
    ${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-specification-xhtml-stylesheet.xsl
  )
  distclean("${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-specification-xhtml-stylesheet.xsl")
endif(BRLCAD_EXTRADOCS_HTML)

if(BRLCAD_EXTRADOCS_PHP)
  configure_file(
    ${CMAKE_CURRENT_SOURCE_DIR}/../resources/brlcad/brlcad-specification-xhtml-stylesheet.xsl.in
    ${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-specification-xhtml-stylesheet.xsl
  )
  distclean("${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-specification-xhtml-stylesheet.xsl")
endif(BRLCAD_EXTRADOCS_PHP)

# Files for PDF products
if(BRLCAD_EXTRADOCS_PDF)
  # Style sheet for XSLT transformation to PDF
  configure_file(
    ${CMAKE_CURRENT_SOURCE_DIR}/../resources/brlcad/brlcad-specification-fo-stylesheet.xsl.in
    ${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-specification-fo-stylesheet.xsl
  )
  distclean("${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-specification-fo-stylesheet.xsl")
endif(BRLCAD_EXTRADOCS_PDF)

# For HTML and FO (FO is an intermediate file used in the
# XML->PDF transformation) we use variables to hold the full
# stylesheet path.
set(XSL_PHP_STYLESHEET "${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/wordpress.xsl")
set(XSL_HTML_STYLESHEET "${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-specification-xhtml-stylesheet.xsl")
set(XSL_FO_STYLESHEET "${CMAKE_CURRENT_BINARY_DIR}/../resources/brlcad/brlcad-specification-fo-stylesheet.xsl")

set(specifications_EN BRL_CAD_g_format_V5.xml)
if(TARGET librt)
  if(BRLCAD_EXTRADOCS)
    add_docbook("HTML;PHP;PDF" specifications_EN specifications/en "")
  endif(BRLCAD_EXTRADOCS)
endif(TARGET librt)

cmakefiles(
  ${specifications_EN}
  BRL_CAD_g_format_V6.xml
  CMakeLists.txt
)

# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
